package com.kgc.ljp.util;

import java.io.IOException;
import java.util.Properties;

public class ConfigManager {
    private static Properties properties;
    private static ConfigManager configManager;
    public ConfigManager(){
        properties = new Properties();
        try {
            properties.load(this.getClass().getClassLoader().getResourceAsStream("base.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static ConfigManager insetence(){
        if (configManager==null){
            configManager = new ConfigManager();
        }
        return configManager;
    }
    public String getString(String key){
        return properties.getProperty(key);
    }
}
